<?php

namespace plugin\agent\app\api\controller;

use app\common\controller\BaseApiController;
use plugin\agent\app\api\logic\AgentCommissionLogic;

class CommissionController extends BaseApiController
{
    protected function init()
    {
        parent::init();
        $this->logic = new AgentCommissionLogic();
    }

    public function list()
    {
        $where = [
            'user_id' => request()->uid,
        ];
        $query = $this->logic->where($where);
        $query->order("create_time desc");
        $data = $this->logic->getPageList($query);
        return $this->success($data);
    }

}
